package com.zenithmind.mall.pojo.dto;

import lombok.Data;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 订单详情DTO
 * 
 * @author ZenithMind Team
 * @since 2025-06-09
 */
@Data
public class OrderItemDTO {

    /**
     * 商品ID
     */
    @NotBlank(message = "商品ID不能为空")
    private String productId;

    /**
     * 商品SKU
     */
    private String productSku;

    /**
     * 商品规格
     */
    private String productSpec;

    /**
     * 商品单价
     */
    @NotNull(message = "商品单价不能为空")
    @DecimalMin(value = "0.01", message = "商品单价必须大于0")
    private BigDecimal productPrice;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;

    /**
     * 小计金额
     */
    @NotNull(message = "小计金额不能为空")
    @DecimalMin(value = "0.01", message = "小计金额必须大于0")
    private BigDecimal totalAmount;
}
